<script>
    layui.use(['layer', 'table', 'form','laydate'], function () {
        var table = layui.table;
        var form = layui.form;
        var layer = layui.layer;
        var laydate = layui.laydate;
        //网站
        form.on('select(website_id)', function(data) {
            $("#websites_topic_id").html('');
            var id = data.value;
            //栏目数据
            $.post("{{route('admin.websitesTopic.topicData')}}",{'website_id':id},function (d){
                var data = eval(d.data);
                _html="<option value=''>全部</option>";
                $.each(data,function (index,val){
                    _html+="<option value='"+val.id+"'>"+val.topic_name+"</option>";
                });
                console.log(_html);
                $("#websites_topic_id").html(_html);
                form.render('select');
            });
        });

        var now = new Date();
        //日期时间选择器
        laydate.render({
            elem: '#test5'
            ,type: 'datetime'
            ,min:now.toLocaleString(),
        });
    });
</script>
